package com.bdqn.pojo;

import java.io.Serializable;
import java.util.List;

/**
 * t_sys_role
 *
 * @author LILIBO
 * @since 2023-09-20
 */
public class SysRole implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Long id;

    /**
     * 角色编码
     */
    private String code;

    /**
     * 角色名称
     */
    private String roleName; // MyBatis会通过属性名称和属性setter方法进行映射

    /**
     * 创建者
     */
    private Long createdUserId;

    /**
     * 创建时间
     */
    private String createdTime;

    /**
     * 修改者
     */
    private Long updatedUserId;

    /**
     * 修改时间
     */
    private String updatedTime;

    /**
     * 角色对应的用户
     */
    private List<SysUser> userList;

    // 默认无参构造方法不写将会报错
    public SysRole() {
    }

    public SysRole(String code, String roleName, Long createdUserId, String createdTime, Long updatedUserId, String updatedTime) {
        this.code = code;
        this.roleName = roleName;
        this.createdUserId = createdUserId;
        this.createdTime = createdTime;
        this.updatedUserId = updatedUserId;
        this.updatedTime = updatedTime;
    }

    public List<SysUser> getUserList() {
        return userList;
    }

    public void setUserList(List<SysUser> userList) {
        this.userList = userList;
    }

    @Override
    public String toString() {
        return "SysRole{" +
                "id=" + id +
                ", code='" + code + '\'' +
                ", roleName='" + roleName + '\'' +
                ", createdUserId=" + createdUserId +
                ", createdTime='" + createdTime + '\'' +
                ", updatedUserId=" + updatedUserId +
                ", updatedTime='" + updatedTime + '\'' +
                '}';
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public Long getCreatedUserId() {
        return createdUserId;
    }

    public void setCreatedUserId(Long createdUserId) {
        this.createdUserId = createdUserId;
    }

    public String getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(String createdTime) {
        this.createdTime = createdTime;
    }

    public Long getUpdatedUserId() {
        return updatedUserId;
    }

    public void setUpdatedUserId(Long updatedUserId) {
        this.updatedUserId = updatedUserId;
    }

    public String getUpdatedTime() {
        return updatedTime;
    }

    public void setUpdatedTime(String updatedTime) {
        this.updatedTime = updatedTime;
    }

}
